package org.apache.harmony.javax.security.auth.login;

import org.apache.harmony.javax.security.auth.AuthPermission;

public abstract class Configuration
{
  private static Configuration configuration;
  private static final AuthPermission GET_LOGIN_CONFIGURATION = new AuthPermission("getLoginConfiguration");
  private static final AuthPermission SET_LOGIN_CONFIGURATION = new AuthPermission("setLoginConfiguration");
  private static final String LOGIN_CONFIGURATION_PROVIDER = "login.configuration.provider";

  public static Configuration getConfiguration()
  {
    SecurityManager localSecurityManager = System.getSecurityManager();
    if (localSecurityManager != null)
      localSecurityManager.checkPermission(GET_LOGIN_CONFIGURATION);
    return getAccessibleConfiguration();
  }

  private static final Configuration getDefaultProvider()
  {
    return new Configuration()
    {
      public void refresh()
      {
      }

      public AppConfigurationEntry[] getAppConfigurationEntry(String paramAnonymousString)
      {
        return new AppConfigurationEntry[0];
      }
    };
  }

  static Configuration getAccessibleConfiguration()
  {
    Configuration localConfiguration = configuration;
    if (localConfiguration == null)
      synchronized (Configuration.class)
      {
        if (configuration == null)
          configuration = getDefaultProvider();
        return configuration;
      }
    return localConfiguration;
  }

  public static void setConfiguration(Configuration paramConfiguration)
  {
    SecurityManager localSecurityManager = System.getSecurityManager();
    if (localSecurityManager != null)
      localSecurityManager.checkPermission(SET_LOGIN_CONFIGURATION);
    configuration = paramConfiguration;
  }

  public abstract AppConfigurationEntry[] getAppConfigurationEntry(String paramString);

  public abstract void refresh();
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     org.apache.harmony.javax.security.auth.login.Configuration
 * JD-Core Version:    0.6.1
 */